package com.qd.panda.model;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.time.LocalDate;
import java.math.BigDecimal;
import java.time.LocalTime;

/**
 * 承租信息
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_park_space_tenant")
public class ParkSpaceTenant extends Model<ParkSpaceTenant> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 租赁开始时间
     */
    @TableField("start_date")
    private LocalDate startDate;
    /**
     * 租赁结束时间
     */
    @TableField("end_date")
    private LocalDate endDate;
    /**
     * 租赁开始小时
     */
    @TableField("start_hour")
    private LocalTime startHour;
    /**
     * 租赁结束小时
     */
    @TableField("end_hour")
    private LocalTime endHour;
    /**
     * 租赁天数
     */
    @TableField("days")
    private Long days;
    /**
     * 实际租赁天数
     */
    @TableField("actual_days")
    private Long actualDays;
    /**
     * 车主总收益
     */
    @TableField("deduction_total_revenue")
    private BigDecimal deductionTotalRevenue;
    /**
     * 单价
     */
    @TableField("day_price")
    private BigDecimal dayPrice;
    /**
     * 总费用
     */
    @TableField("total_cost")
    private BigDecimal totalCost;
    /**
     * 退款金额
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 扣费金额
     */
    @TableField("deduction_amount")
    private BigDecimal deductionAmount;
    /**
     * 退款时间
     */
    @TableField("refund_time")
    private LocalDateTime refundTime;
    /**
     * 退款原因
     */
    @TableField("refund_reason")
    private String refundReason;
    /**
     * 退款说明
     */
    @TableField("refund_note")
    private String refundNote;
    /**
     * 订单状态:0拍下未付款1付款中2付款成功3付款失败4申请退款5退款成功6退款失败
     */
    @TableField("tenant_order_state")
    private Integer tenantOrderState;
    /**
     * 租赁ID
     */
    @TableField("sid")
    private String sid;
    /**
     * 租赁人
     */
    @TableField("tenant")
    private String tenant;
    /**
     * 下单时间
     */
    @TableField("order_time")
    private LocalDateTime orderTime;
    /**
     * 租赁人车牌号
     */
    @TableField("tenant_number")
    private String tenantNumber;

    public void freeData() {
        this.id = null;
        this.startDate = null;
        this.endDate = null;
        this.startHour = null;
        this.endHour = null;
        this.days = null;
        this.actualDays = null;
        this.deductionTotalRevenue = null;
        this.dayPrice = null;
        this.totalCost = null;
        this.refundAmount = null;
        this.deductionAmount = null;
        this.refundTime = null;
        this.refundReason = null;
        this.refundNote = null;
        this.tenantOrderState = null;
        this.sid = null;
        this.tenant = null;
        this.orderTime = null;
        this.tenantNumber = null;
    }

}
